package com.mini.rpc.protocol.serialization;

import java.io.IOException;

/**
 * @author lbx
 * @version 1.0.0
 * @interfaceName RpcSerialization
 * @description TODO
 * @date 2021/10/5 13:53
 **/
public interface RpcSerialization {

    <T> byte[] serialize(T obj) throws Exception;

    <T> T deserialize(byte[] data, Class<T> clz) throws IOException;
}
